module.exports = app => {
    const mongoose = app.mongoose;
    const Schema = mongoose.Schema;

    const GameSchema = new Schema({
        wxId: { type: String },
        phoneId: { type: String },
        aCount: { type: Number, default: 0 },
        createTime: { type: Date, default: Date.now },
        updateTime: { type: Date, default: Date.now }
    }, {
        timestamps: { createdAt: 'createTime', updatedAt: 'updateTime' }
    });

    return mongoose.model('Account', GameSchema);
}